﻿using Newtonsoft.Json;
using System.Collections.Generic;
using ZZDingTalkSDK.ZZDingTalkRequest.Common;
using ZZDingTalkSDK.ZZDingTalkResponse;
using ZZDingTalkSDK.ZZDingTalkResponse.common;

namespace ZZDingTalkSDK.ZZDingTalkRequest
{
    /// <summary>
    /// 分页获取下⼀级组织 Code 列表
    /// </summary>
    public class MoziOrganizationPageSubOrganizationCodesRequest : IZZDRequest<ZZDingTalkPageResponseContent<List<string>>>
    {
        /// <summary>
        /// 租户ID
        /// </summary>
        [JsonProperty("tenantId")]
        public string? TenantId { get; set; }

        /// <summary>
        /// 组织Code
        /// </summary>
        [JsonProperty("organizationCode")]
        public string? OrganizationCode { get; set; }

        /// <summary>
        /// 查询下一级子组织状态条件
        ///        A - 查询有效的数据
        ///        F - 查询无效的数据
        ///       TOTAL - 查询所有的数据
        /// </summary>
        [JsonProperty("status")]
        public string Status { get; set; } = "A";

        /// <summary>
        /// 每页条数, 默认20, 最大只能100
        /// </summary>
        [JsonProperty("pageSize")]
        public int PageSize { get; set; } = 50;

        /// <summary>
        /// 当前页码, 开始页码为1, 小于1认为为1
        /// </summary>
        [JsonProperty("pageNo")]
        public int PageNo { get; set; } = 1;

        /// <summary>
        /// 是否返回查询结果总数默认不需要
        /// </summary>
        [JsonProperty("returnTotalSize")]
        public bool ReturnTotalSize { get; set; } = false;

        public string GetApiName()
        {
            return "/mozi/organization/pageSubOrganizationCodes";
        }
    }
}